# coding: utf-8
from automationreport import global_configure


class GainData:

    def get_counts_data(self, redis_keys):
        connect_redis = global_configure.ConfigureFile().get_configure_file('redis', '')  # 连接redis
        get_redis_data = connect_redis.get(redis_keys)
        if get_redis_data:
            get_redis_data = get_redis_data.decode('utf8')
        else:
            get_redis_data = False
        return get_redis_data
